//! 消息版本
//!
//!
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum MessageVersion {
    Dev1_0,
    Pro2_0,
}

impl MessageVersion {
    pub fn description(&self) -> &'static str {
        match self {
            MessageVersion::Dev1_0 => {
                "Transformation snapshot data structure, and add attribution vers into BaseMessage."
            }

            MessageVersion::Pro2_0 => {
                "Attribution fee unit change atom to nrg, and add MessageProtoVersion enum."
            }
        }
    }

    pub fn to_str(&self) -> &'static str {
        match self {
            MessageVersion::Dev1_0 => "1.0dev",
            MessageVersion::Pro2_0 => "2.0",
        }
    }
}
